package com.ruoyi.web.controller.project.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单记录对象 t_order_record
 * 
 * @author ruoyi
 * @date 2025-06-27
 */
public class TOrderRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单记录唯一ID */
    private String recordId;

    /** 收入金额（单位：元） */
    @Excel(name = "收入金额（元）",importName = "收入金额（元）",sort = 2)
    private BigDecimal incomeAmount;

    /** 订单数量 */
    @Excel(name = "订单总数（个）",importName = "订单总数（个）",sort = 3)
    private String orderCount;

    /** 车辆数量 */
    @Excel(name = "车辆数量",importName = "车辆数量",sort = 4)
    private String vehicleCount;

    /** 记录日期（YYYY-MM-DD） */
    @Excel(name = "日期", dateFormat = "yyyy-MM-dd",importName = "日期",sort = 1)
    private Date recordDate;

    /** 记录归属人ID */
//    @Excel(name = "记录归属人ID")
    private Long userId;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
//    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /**
     * 外表字段
     * @param recordId
     */
    @Excel(name = "领养人", width = 30,sort = 5)
    private String nickName;

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    /**
     * 非持久化字段
     * @return
     */
    private List<Date> recordDateRange;

    public List<Date> getRecordDateRange() {
        return recordDateRange;
    }

    public void setRecordDateRange(List<Date> recordDateRange) {
        this.recordDateRange = recordDateRange;
    }

    public void setRecordId(String recordId)
    {
        this.recordId = recordId;
    }

    public String getRecordId() 
    {
        return recordId;
    }

    public void setIncomeAmount(BigDecimal incomeAmount)
    {
        this.incomeAmount = incomeAmount;
    }

    public BigDecimal getIncomeAmount()
    {
        return incomeAmount;
    }

    public void setOrderCount(String orderCount) 
    {
        this.orderCount = orderCount;
    }

    public String getOrderCount() 
    {
        return orderCount;
    }

    public void setVehicleCount(String vehicleCount) 
    {
        this.vehicleCount = vehicleCount;
    }

    public String getVehicleCount() 
    {
        return vehicleCount;
    }

    public void setRecordDate(Date recordDate) 
    {
        this.recordDate = recordDate;
    }

    public Date getRecordDate() 
    {
        return recordDate;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TOrderRecord that = (TOrderRecord) o;
        return Objects.equals(incomeAmount, that.incomeAmount) && Objects.equals(orderCount, that.orderCount) && Objects.equals(vehicleCount, that.vehicleCount) && Objects.equals(userId, that.userId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(incomeAmount, orderCount, vehicleCount, userId);
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("recordId", getRecordId())
            .append("incomeAmount", getIncomeAmount())
            .append("orderCount", getOrderCount())
            .append("vehicleCount", getVehicleCount())
            .append("recordDate", getRecordDate())
            .append("userId", getUserId())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
}
